These "sperm masses" were conducted during the attendant women's menstrual period. The blood mixed with the sperm of the celebrant was poured into a chalice containing some flour, resulting in a love potion.
Madame de Montespan practiced such magic to ensure the favors of the King and the Dauphin, and to ensure that the queen remained barren.